package com.kingstar.ceres.data.db.mapper;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;

public interface CustomMapper {

    @Delete("DELETE FROM  ${tableName} where to_char(CREATE_TIME,'yyyyMMdd')=#{dataDate}")
    long deleteByTableAndDate(@Param("tableName")String tableName, @Param("dataDate") String dataDate);
    @Delete("DELETE FROM  ${tableName} where SUBSTR(to_char(CREATE_TIME),0,8) = #{dataDate}")
    long deleteByTableAndDateStr(@Param("tableName")String tableName, @Param("dataDate") String dataDate);
    @Delete("DELETE FROM  ${tableName} where SUBSTR(to_char(CREATE_TIME),0,8) = #{dataDate}")
    long deleteByTable(@Param("tableName")String tableName);

}